﻿namespace 依赖注入传染;

public class Controller
{
    private readonly ILog _myLog;
    private readonly IStorage _myStorage;

    public Controller(ILog myLog, IStorage myStorage)
    {
        this._myStorage = myStorage;
        this._myLog = myLog;
    }

    public void TestMethod()
    {
        this._myLog.Log("start upload...");
        Console.WriteLine(_myStorage.Save("myServer", "some content..."));
        this._myLog.Log("end upload...");
    }
}